package com.shike.web.controller;

import com.shike.core.utils.R;
import com.shike.web.service.IdentityService;
import com.shike.web.vo.UserVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class IdentityController {

    @Autowired
    private IdentityService identityService;

    /**
     * 用户登录
     * @param userVo
     * @return
     */
    @PostMapping("/login")
    public R login(@RequestBody UserVo userVo) {
        return identityService.login(userVo);
    }

}